<template>
  <base-field
    :isSelected="isSelected"
    :item="item"
    @changeItemId="changeItemId"
    @deleteItem="deleteItem"
    @cloneItem="cloneItem"
    @setItemOptions="setItemOptions"
    @editTitle="editTitle">
    <template>
      <div class="body-div">
        <div class="field-preview"></div>
      </div>
    </template>
  </base-field>
</template>

<script>
import BaseField from '../baseField'
import {ElementMixin} from 'vue-slicksort'
export default {
  mixins: [ElementMixin],
  props: {
    item: Object,
    isSelected: {
      type: Boolean,
      default: false
    }
  },
  components: {
    BaseField
  },
  methods: {
    changeItemId (value) {
      this.$emit('changeItemId', value)
    },
    deleteItem (value) {
      this.$emit('deleteItem', value)
    },
    cloneItem (value) {
      this.$emit('cloneItem', value)
    },
    setItemOptions (value) {
      this.$emit('setItemOptions', value)
    },
    editTitle (value) {
      this.$emit('editTitle', value)
    }
  }
}
</script>

<style lang="less" scoped>
@import url('./index.less');
</style>
